Skip to content

gh-111924: Use PyMutex for runtime global locks.#112207

Merged
ericsnowcurrently merged 4 commits intopython:mainfrom
colesbury:global_locks
Dec 7, 2023
Merged

gh-111924: Use PyMutex for runtime global locks.#112207
ericsnowcurrently merged 4 commits intopython:mainfrom
colesbury:global_locks

Conversation

@colesbury
Copy link
Contributor

@colesbury colesbury commented Nov 17, 2023

This replaces some usages of PyThread_type_lock with PyMutex, which does not require memory allocation to initialize.

This simplifies some of the runtime initialization and is also one step towards avoiding changing the default raw memory allocator during initialize/finalization, which can be non-thread-safe in some circumstances.

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3.13 bugs and security fixes interpreter-core (Objects, Python, Grammar, and Parser dirs) skip news topic-free-threading

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants